﻿using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations.Schema;
using System;

namespace Himall.Entity
{
    public partial class ShopInfo
    {
        /// <summary>
        /// 显示店铺状态
        /// </summary>
        [NotMapped]
        public ShopAuditStatus ShowShopAuditStatus
        {
            get
            {
                ShopAuditStatus result = ShopAuditStatus.Unusable;
                if (this != null)
                {
                    result = this.ShopStatus;
                    //if (this.EndDate != null && this.ShopStatus == ShopAuditStatus.Open)
                    //{
                    //    DateTime endd = this.EndDate.Value.Date.AddDays(1).AddSeconds(-1);
                    //    if ((endd - DateTime.Now).TotalSeconds < 0)
                    //    {
                    //        result = ShopAuditStatus.HasExpired;
                    //    }
                    //}
                }
                return result;
            }
        }

        

        [NotMapped]
        public string ShopAccount { get; set; }

        [NotMapped]
        public List<long> BusinessCategory { get; set; }

        [NotMapped]
        public string CompanyRegionAddress { get; set; }

        [NotMapped]
        public int Sales
        {
            get;
            set;
        }

        [NotMapped]
        public string ProductAndDescription
        {
            get;
            set;
        }

        [NotMapped]
        public string SellerServiceAttitude
        {
            get;
            set;
        }

        [NotMapped]
        public string SellerDeliverySpeed
        {
            get;
            set;
        }

        [NotMapped]
        public class ShopVistis
        {
            public decimal VistiCounts { get; set; }

            public decimal SaleCounts { get; set; }

            public decimal SaleAmounts { get; set; }

            public decimal OrderCounts { get; set; }
        }

        /// <summary>
        /// 店铺欢迎语
        /// </summary>
        [NotMapped]
        public string WelcomeTitle { get; set; }

        /// <summary>
        /// 坐标
        /// </summary>
        [NotMapped]
        public decimal Lng { get; set; }

        /// <summary>
        /// 坐标
        /// </summary>
        [NotMapped]
        public decimal Lat { get; set; }

        /// <summary>
        /// 行业
        /// </summary>
        [NotMapped]
        public string Industry { get; set; }

        /// <summary>
        /// 营业环境图片，imgpath1;imgpath2
        /// </summary>
        [NotMapped]
        public string BranchImage { get; set; }

        /// <summary>
        /// 营业时间
        /// </summary>
        [NotMapped]
        public string OpeningTime { get; set; }

        /// <summary>
        /// 店铺描述
        /// </summary>
        [NotMapped]
        public string ShopDescription { get; set; }

        /// <summary>
        /// 申请人职位
        /// </summary>
        [NotMapped]
        public string ContactsPosition { get; set; }
    }
}
